<?php include dirname(__FILE__) . '/header.html'; ?>

<table class="dir">
    <thead><tr>
        <th width="400px">Name</th>
        <th class="right">Quality</th>
        <th class="right">Errors</th>
        <th class="right">Warns</th>
        <th class="right">Rev</th>
        <th width="50%">Last Change</th>
    </tr></thead>
    <tbody>
        <? foreach ($vars['childs'] as $name=>$child): ?>
        <tr>

            <? if ($child !== false): ?>
                <td><a href="<?php echo $vars['name']?>/<?php echo $this->_makeName($name)?>.html"><?php echo $name?></a></td>
                <td class="right"><?php echo $this->_showQuality($child->quality)?></td>
                <td class="right"><?php echo $child->errors?></td>
                <td class="right"><?php echo $child->warnings?></td>
            <? else: ?>
                <td><?php echo $name?></td>
                <td colspan='3'></td>
            <? endif; ?>

            <? if (($child !== false) && $child->isFile()): ?>
                <td class="right"><a href="#"><?php echo $child->revision?></a></td>
                <td class="changes"><?php echo $this->_cutEmail($child->author)?>: 
                    <?php echo strlen($child->log) < 50 ? $child->log : substr($child->log, 0, 47) . '...'?></td>
            <? else: ?>
                <td colspan="2"></td>
            <? endif; ?>

        </tr>
        <? endforeach; ?>
    </tbody>
</table>

<?php include dirname(__FILE__) . '/footer.html'; ?>
